<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>pageConext\request\session\application四大作用域对象</title>
</head>
<body>
<h4>pageContext域</h4>
<%
    pageContext.setAttribute("pageContextScope", "李一");
    String a = (String) pageContext.getAttribute("pageContextScope");
%>
pageContextScope:<%=a%>

<h4>request域</h4>
<%
    String b = (String) request.getAttribute("requestScope");
%>
requestScope:<%=b%>

<h4>session域</h4>
<%
    String c = (String) session.getAttribute("sessionScope");
%>
session:<%=c%>
<h4>application域</h4>
<%
    String d = (String) application.getAttribute("servletContextScope");
%>
application:<%=d %>
</body>
</html>
